package com.project.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * 上下文监听器
 */
public class ContextLis implements ServletContextListener {
    //创建上下文对象时触发
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("WEB上下文创建");
    }

    //销毁上下文对象时触发
    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("WEB上下文销毁");
    }
}
